﻿function fnCustomAdd()
{
    //if (instance.parent_id == "") {
    //    instance.parent_id = "00000000-0000-0000-0000-000000000000";
    //}
    //return "";
    mini.open({
        url: "/ExtendPage/editview/DefineEditForm.aspx?channel_id=" + treeId + "&formcode=" + getPar("formcode") + "&entity=" + const_EditEntity + "&functionid=" + const_functionId + "&id=",
        title: "新增" + const_PageTitle, width: _openWindowWidth, height: _openWindowHeight,
        onload: function () {
            //var iframe = this.getIFrameEl();
            //var data = { action: "new" };
            //iframe.contentWindow.SetData(data);
        },
        ondestroy: function (action) {
            grid.reload();
        }
    });
}


function fnCustomNodeSelect(e) {
    treeId = e.node.id;
    const_TreeCustomCondition = "channel_id='" + e.node.id + "'";
    grid.setUrl("../data/jsondata.aspx?type=1&entity=" + const_entityName + "&order=" + const_Order + "&desc=" + const_Desc + "&datagrid=true&pagesize=1000&customCondition=&condition=" + const_TreeCustomCondition);
    //const_TreeCustomCondition="";
    grid.load({ /*condition:"channel_id='"+e.node.id+"'"*/ });

}
